package com.jxb.ractBase;

import reactor.core.publisher.Flux;

/**
 * 类注释
 *
 * @author jiaobo
 * @date Created in 2024/10/23 21:21
 **/
public class DistinctTest {

    public static void main(String[] args) {
        Flux<Integer> just = Flux.just(1, 1, 5, 2, 2, 2, 1, 2, 3, 3, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 4, 4, 4, 4, 5, 5);

        System.out.println( "distinct: " );
        just.distinct().subscribe(System.out::println);
        System.out.println( "distinctUntilChanged:" );
        just.distinctUntilChanged().subscribe(System.out::println);
    }

}
